struct BinTree{
	char data;
	BinTree*left;
	BinTree*right;
};
BinTree*root;
BinTree*init(char data){
    root=(BinTree*)malloc(sizeof(BinTree));
	root->data=data;
	root->left=NULL;
	root->right=NULL;
	return root;	
}
void preOrder(Bintree*root){
	if(root!=NULL){
		printf("%c-",root->data);
		preOrder(root->left);
		preOrder(root->right);
	}
}
void preOrder(Bintree*root){
	if(root!=NULL){
		preOrder(root->left);
		printf("%c-",root->data);
		preOrder(root->right);
	}
}
void preOrder(Bintree*root){
	if(root!=NULL){
		preOrder(root->left);
		preOrder(root->right);
		printf("%c-",root->data);
	}
}
intmain(){
	BinTree*root=init('A');
	root->left=init('B');
	root->right=init('C');
	BinTree*b=root->left;
	b->left=init('D');
	BinTree*c=root->right;
	c->left=init('E');
	c->right=init('F');
	printf("前序遍历：");
	preOrder(root);
	printf("\n");
	printf("中序遍历：");
	preOrder(root);
	printf("\n");
	printf("后序遍历：");
	preOrder(root);
	printf("\n");
	return 0;
}
